package com.example.CarManagement.sys.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author 徐佳彪
 * @since 2025-07-08
 */
@TableName("c_user")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户唯一标识，主键
     */
    private String id;

    /**
     * 用户头像链接
     */
    private String avatar;

    /**
     * 用户名，唯一标识用户
     */
    private String username;


    /**
     * 用户密码（建议加密存储）
     */
    private String password;

    /**
     * 用户电话号码
     */
    private String phoneNumber;

    /**
     * 用户个人介绍
     */
    private String content;

    /**
     * 用户创建时间
     */
    private LocalDateTime createTime;

    /**
     * 用户上次登录时间
     */
    private LocalDateTime loginTime;

    /**
     * 用户状态（1:正常，0:禁用）
     */
    private boolean status;

    /**
     * 是否删除（0:未删除，1:已删除）
     */
    private Boolean deleted;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }


    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(LocalDateTime loginTime) {
        this.loginTime = loginTime;
    }

    public boolean getStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public Boolean getDeleted() {
        return deleted;
    }

    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    @Override
    public String toString() {
        return "User{" +
            "id = " + id +
            ", avatar = " + avatar +
            ", username = " + username +

            ", password = " + password +
            ", phoneNumber = " + phoneNumber +
            ", content = " + content +
            ", createTime = " + createTime +
            ", loginTime = " + loginTime +
            ", status = " + status +
            ", deleted = " + deleted +
        "}";
    }
}
